package org.hqq.googlemaventest.client.explorer;

import com.google.gwt.user.client.ui.Button;

public class ButtonPage {
	private static final int LINE_NUM=7;
	private static final int COLUMN_NUM=4;
	
	Button[][] buttonMetrics=new Button[LINE_NUM][COLUMN_NUM];
	

	
	public Button[][] getButtonMetrics(){
		return this.buttonMetrics;
	}
	
	public void put(int x,int y,Button button){
		buttonMetrics[x][y]=button;
	}
	
	public void put(Button buttonInstance){
		for (Button[] buttons:buttonMetrics) {
			for(Button button:buttons){
				if(button==null){
					button=new Button();
					return;
				}
			}
		}
	}
	
	public Button indexOf(int x,int y){
		return buttonMetrics[x][y];
	}
}
